package utils;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;

public class test {
    public static void main(String[] args) {
//        Connection connection = JDBCUtils.getConnection();
        Connection connection = null;
        PreparedStatement pstmt = null;
        try {
            connection = DruidUtils.getConnection();
            String sql = "insert into dept values(50,?,?)";
            pstmt = connection.prepareStatement(sql);
            pstmt.setString(1,"HOME");
            pstmt.setString(2,"moon");

            pstmt.executeUpdate();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
        System.out.println(pstmt+"/////////"+connection);
        DruidUtils.close(pstmt,connection);
    }
}
